<?php
// +----------------------------------------------------------------------
// | UCToo [ Universal Convergence Technology ]
// +----------------------------------------------------------------------
// | Copyright (c) 2014-2018 http://uctoo.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: Patrick <contact@uctoo.com>
// +----------------------------------------------------------------------

if (!function_exists('getUserByUid')) {
    function getUserByUid($uid)
    {
        $user = \app\common\model\User::get(['uid' => $uid]);
        return $user;
    }
}

if (!function_exists('getUidByUserid')) {
    function getUidByUserid($id)
    {
        $user = \app\common\model\User::get($id);
        return $user->uid;
    }
}